.class public final Lnet/tsapps/topdeals/b/e;
.super Landroid/app/Dialog;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/widget/Button;

.field private b:Landroid/widget/Button;

.field private c:Lnet/tsapps/topdeals/a/o;

.field private d:Landroid/content/DialogInterface$OnClickListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;)V
    .locals 3

    invoke-direct {p0, p1}, Landroid/app/Dialog;-><init>(Landroid/content/Context;)V

    iput-object p3, p0, Lnet/tsapps/topdeals/b/e;->d:Landroid/content/DialogInterface$OnClickListener;

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/e;->requestWindowFeature(I)Z

    const v0, 0x7f030009

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/e;->setContentView(I)V

    const v0, 0x7f050027

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/e;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ExpandableListView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setGroupIndicator(Landroid/graphics/drawable/Drawable;)V

    new-instance v2, Lnet/tsapps/topdeals/a/o;

    const-string v1, "layout_inflater"

    invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/LayoutInflater;

    invoke-direct {v2, v1, p2}, Lnet/tsapps/topdeals/a/o;-><init>(Landroid/view/LayoutInflater;Ljava/lang/String;)V

    iput-object v2, p0, Lnet/tsapps/topdeals/b/e;->c:Lnet/tsapps/topdeals/a/o;

    iget-object v1, p0, Lnet/tsapps/topdeals/b/e;->c:Lnet/tsapps/topdeals/a/o;

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setAdapter(Landroid/widget/ExpandableListAdapter;)V

    const v0, 0x7f050021

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/e;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lnet/tsapps/topdeals/b/e;->a:Landroid/widget/Button;

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->a:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f050020

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/b/e;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lnet/tsapps/topdeals/b/e;->b:Landroid/widget/Button;

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->b:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method


# virtual methods
.method public final a()Ljava/lang/String;
    .locals 8

    const/4 v2, 0x0

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->c:Lnet/tsapps/topdeals/a/o;

    iget-object v1, v0, Lnet/tsapps/topdeals/a/o;->a:Lnet/tsapps/topdeals/e/c;

    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    iget-object v0, v1, Lnet/tsapps/topdeals/e/c;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :cond_0
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v0

    new-array v4, v0, [J

    move v1, v2

    :goto_0
    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lt v1, v0, :cond_3

    const-string v0, ""

    :goto_1
    array-length v1, v4

    if-lt v2, v1, :cond_4

    return-object v0

    :cond_1
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/k;

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/k;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v5

    :cond_2
    :goto_2
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/f;

    iget-wide v6, v0, Lnet/tsapps/topdeals/objects/f;->b:J

    invoke-virtual {v1, v6, v7}, Lnet/tsapps/topdeals/e/c;->a(J)Z

    move-result v6

    if-eqz v6, :cond_2

    iget-wide v6, v0, Lnet/tsapps/topdeals/objects/f;->b:J

    invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :cond_3
    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v5

    aput-wide v5, v4, v1

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_4
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    aget-wide v5, v4, v2

    invoke-virtual {v1, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    array-length v1, v4

    add-int/lit8 v1, v1, -0x1

    if-eq v2, v1, :cond_5

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v0, ","

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :cond_5
    add-int/lit8 v2, v2, 0x1

    goto :goto_1
.end method

.method public final a(Ljava/lang/String;)V
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->c:Lnet/tsapps/topdeals/a/o;

    iget-object v0, v0, Lnet/tsapps/topdeals/a/o;->a:Lnet/tsapps/topdeals/e/c;

    invoke-virtual {v0, p1}, Lnet/tsapps/topdeals/e/c;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->c:Lnet/tsapps/topdeals/a/o;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/a/o;->notifyDataSetChanged()V

    return-void
.end method

.method public final onClick(Landroid/view/View;)V
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->b:Landroid/widget/Button;

    if-ne p1, v0, :cond_1

    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->d:Landroid/content/DialogInterface$OnClickListener;

    const/4 v1, 0x1

    invoke-interface {v0, p0, v1}, Landroid/content/DialogInterface$OnClickListener;->onClick(Landroid/content/DialogInterface;I)V

    invoke-virtual {p0}, Lnet/tsapps/topdeals/b/e;->dismiss()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lnet/tsapps/topdeals/b/e;->a:Landroid/widget/Button;

    if-ne p1, v0, :cond_0

    invoke-virtual {p0}, Lnet/tsapps/topdeals/b/e;->dismiss()V

    goto :goto_0
.end method
